/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 */

#ifndef __BOARD_H__
#define __BOARD_H__

#include "hc32_common.h"
#include "hc32_ddl.h"

/* High speed sram. */
#ifdef __CC_ARM
extern int Image$$RW_IRAM1$$ZI$$Limit;
#define HEAP_BEGIN              (&Image$$RW_IRAM1$$ZI$$Limit)
#elif __ICCARM__
#pragma section="HEAP"
#define HEAP_BEGIN              (__segment_end("HEAP"))
#else
extern int __bss_end;
#define HEAP_BEGIN              (&__bss_end)
#endif

#define HEAP_END           (0x20027000)


void rt_hw_board_init(void);

void usart_ll_init(M4_USART_TypeDef *USARTx);
void i2c_ll_init(M4_I2C_TypeDef *I2Cx);

#endif

